package org.leo.app.dao;

import org.leo.app.domain.Book;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.QueryByExampleExecutor;

import java.util.List;

// 继承QueryByExampleExecutor接口，支持Example查询
public interface BookDao extends CrudRepository<Book, Integer>,
        QueryByExampleExecutor<Book>, BookCustomDao {

    List<Book> findByName(String name);

    List<Book> findByDescription(String subDesc);

}
